package com.xianzhi.controller.content;

import com.xianzhi.dao.AdDao;
import com.xianzhi.dto.AdDto;
import com.xianzhi.service.AdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/ad")
public class AdController {
    @Autowired
    private AdService adService;
    @RequestMapping
    public String init(ModelMap modelMap){
        //表示查询条件
        AdDto adDto =new AdDto();
        modelMap.addAttribute("list",adService.searchByPage(adDto));
        return  "/content/adList";
    };
}
